﻿using System.Collections.Generic;
using UnityEngine;
/*测试玩家偏好*/
public class Test_PlayerPrefs : MonoBehaviour
{
    int lv = 1;
    private void Start()
    {
        lv = PlayerPrefs.GetInt("lv", 1);
    }
    private void OnGUI()
    {
        if (GUILayout.Button("升级"))
        {
            lv++;
            PlayerPrefs.SetInt("lv", lv);
        }
        GUILayout.Label(lv.ToString());
    }
}
